import Vue from "vue";
import VueI18n from "vue-i18n";
import store from "@/store";
import ar from "./lang/ar";
import en from "./lang/en";
import es from "./lang/es";
import fr from "./lang/fr";
import ja from "./lang/ja";
import ko from "./lang/ko";
import ru from "./lang/ru";
import hi from "./lang/hi";
import id from "./lang/id";
import it from "./lang/it";
import de from "./lang/de";
import ms from "./lang/ms";
import pt from "./lang/pt";
import bd from "./lang/bd";
import pk from "./lang/pk";
import tw from "./lang/tw";
import zhHant from "./lang/zh-Hant.js";

Vue.use(VueI18n);

const i18n = new VueI18n({
  locale: store.getters.lang,
  messages: {
    zh: zhHant,
    tw,
    en,
    ru,
    ar,
    es,
    fr,
    ja,
    ko,
    hi,
    id,
    it,
    de,
    ms,
    pt,
    bd,
    pk,
  },
});

export default i18n;
